<%@ page language="C#" masterpagefile="~/MasterPage.master" autoeventwireup="true" inherits="Gestion_Default, App_Web_nvugbxmf" title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contenido" Runat="Server">
    <table width="100%">
        <tr>
            <td align="left" colspan="1" style="width: 400px; height: 14px; text-align: left"
                valign="top">
                <strong>Ordenes Ingresadas</strong></td>
            <td align="left" colspan="1" style="width: 12px; height: 14px; text-align: left"
                valign="top">
            </td>
            <td align="left" colspan="2" style="height: 14px; text-align: left" valign="top">
                <strong>Datos generales<br />
                </strong>
            </td>
            <td align="left" colspan="1" style="width: 100px; height: 14px; text-align: left"
                valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" rowspan="6" style="width: 400px; text-align: left"
                valign="top">
                    <asp:GridView ID="gdvOrdenesDeTrabajo" runat="server" AutoGenerateColumns="False"
                        Width="100%" DataKeyNames="Id" OnSelectedIndexChanged="gdvOrdenesDeTrabajo_SelectedIndexChanged" Height="100%" EmptyDataText="No hay ordenes">
                        <Columns>
                            <asp:TemplateField HeaderText="N&#176;" SortExpression="NumeroOrdenDeTrabajo">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("NumeroOrdenDeTrabajo") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("NumeroOrdenDeTrabajo") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Fecha" SortExpression="Fecha">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Fecha") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Fecha", "{0:d}") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Cliente" SortExpression="Cliente">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("[Cliente.RazonSocial]") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("Cliente.RazonSocial") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField SelectText="Seleccionar" ShowSelectButton="True" />
                        </Columns>
                        <RowStyle CssClass="RowStyle" />
        <PagerStyle CssClass="PagerStyle" />
        <HeaderStyle CssClass="HeaderStyle" />
        <AlternatingRowStyle CssClass="AltRowStyle" />
        <SelectedRowStyle CssClass="SelectedRowStyle" />
                    </asp:GridView>
            </td>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="width: 100px; text-align: right" valign="top">
                Numero OT:</td>
            <td align="left" colspan="1" style="width: 300px" valign="top">
                <asp:Label ID="lblNumero" runat="server" Width="100%"></asp:Label></td>
            <td align="left" colspan="1" style="width: 100px" valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="width: 100px; text-align: right" valign="top">
                Cliente :</td>
            <td align="left" colspan="1" style="width: 300px; text-align: left" valign="top">
                <asp:Label ID="lblCliente" runat="server" Width="100%"></asp:Label></td>
            <td align="left" colspan="1" style="width: 100px; text-align: left" valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="width: 100px; text-align: right" valign="top">
                Descripcion :</td>
            <td align="left" colspan="1" style="width: 300px; text-align: left" valign="top">
                <asp:Label ID="lblDescripcion" runat="server" Width="100%"></asp:Label></td>
            <td align="left" colspan="1" style="width: 100px; text-align: left" valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="width: 100px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="1" style="width: 300px; text-align: left" valign="top">
            </td>
            <td align="left" colspan="1" style="width: 100px; text-align: left" valign="top">
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: right" valign="top">
            </td>
            <td align="left" colspan="3" style="text-align: right" valign="top">
                <asp:GridView ID="gdvDetalle" runat="server" AutoGenerateColumns="False"
                        Width="100%" DataKeyNames="Id" Height="100%" OnSelectedIndexChanged="gdvDetalle_SelectedIndexChanged" ShowFooter="True">
                                    <RowStyle CssClass="RowStyle" />
                                    <Columns>
                                        <asp:TemplateField HeaderText="Codigo">
                                            <EditItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Producto.Codigo") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Producto.Codigo") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Descripcion">
                                            <EditItemTemplate>
                                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("Producto.Descripcion") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("Producto.Descripcion") %>'></asp:Label>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                <asp:Label ID="lblProducto" runat="server" Width="100%"></asp:Label>
                                            </FooterTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Cantidad">
                                            <EditItemTemplate>
                                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("Cantidad") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("Cantidad") %>'></asp:Label>
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                &nbsp;
                                            </FooterTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Despachado">
                                            <FooterTemplate>
                                                <asp:TextBox ID="txbCantidad" runat="server" Width="60px"></asp:TextBox><asp:CustomValidator ID="cvlCantidad" runat="server"></asp:CustomValidator>
                                            </FooterTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblDespachado" runat="server" Text='<%# Eval("Despachado") %>'></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="Saldo">
                                            <EditItemTemplate>
                                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("Saldo") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblSaldo" runat="server" Text='<%# Eval("Saldo") %>'></asp:Label>&nbsp;
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                <asp:Button ID="btnDespachar" runat="server" OnClick="Button1_Click" Text="Reingresar" CssClass="botonAceptar" Width="95px" />
                                            </FooterTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField ShowHeader="False">
                                            <ItemTemplate>
                                                <asp:LinkButton ID="lbtSeleccionar" runat="server" CommandName="Select">Seleccionar</asp:LinkButton>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <PagerStyle CssClass="PagerStyle" />
                                    <SelectedRowStyle CssClass="SelectedRowStyle" />
                                    <HeaderStyle CssClass="HeaderStyle" />
                                    <AlternatingRowStyle CssClass="AltRowStyle" />
                                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="left" colspan="1" style="width: 12px; text-align: left" valign="top">
            </td>
            <td align="left" colspan="3" style="text-align: left" valign="top">
            </td>
        </tr>
    </table>
    &nbsp; &nbsp; &nbsp; &nbsp;
    &nbsp; &nbsp;&nbsp;
</asp:Content>

